<%--
  Created by IntelliJ IDEA.
  User: 刘邓
  Date: 2023-06-10
  Time: 19:09
  To change this template use File | Settings | File Templates.
--%>
<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<html>
<head>
    <title>用户按姓名查询名片</title>
    <style>
        .container {
            background-color: #fff;
            border-radius: 10px;
            box-shadow: 0 14px 28px rgba(0, 0, 0, 0.25), 0 10px 10px rgba(0, 0, 0, 0.22);
            position: relative;
            overflow: hidden;
            width: 768px;
            max-width: 100%;
            min-height: 480px;
            margin:0 auto;
        }
        .container div{
            margin-top: 20px;
            margin-left: 40%;
        }

        input {
            background-color: #eee;
            border: none;
            padding: 12px 15px;
            margin: 8px 10px;
        }
    </style>
</head>
<body>
<body>
<form action="/home/applicationLikeNameCards.jsp" class="container">
    <div><input type="text" name="name" placeholder="请输入姓名中包含的内容" id="q_name"></div>
    <div style="padding-left: 30px"><input type="submit" value="查询" id="query"></div>
</form>
</body>
<script>
    let query = document.getElementById("query");
    let q_name = document.getElementById("q_name");
    query.addEventListener("click",(evt)=> {
        if(q_name.value == "" || q_name.value == null){
            alert("查询内容不能为空");
            evt.preventDefault();
        }
    })
</script>
</body>
</html>
